package routers

import (
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
	"novel-hub/handlers"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.Use(cors.Default())
	r.Static("static", "./static")
	r.POST("/user/add", handlers.UserAdd)
	r.GET("/user/list", handlers.UserList)
	r.GET("/user/limit", handlers.UserLimit)
	r.POST("/user/PL", handlers.UserPL)
	return r
}
